package com.niiwoo.civet.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * t_tc_refund_order
 * refund_type枚举类
 * Created by yuanguang on 2018/4/27.
 */
@Getter
@AllArgsConstructor
public enum RefundTypeEnum {
    IMMEDIATELY((byte)1,"立即还款"),
    OVERDEPT((byte)2,"提前结清");

    private Byte refundType;
    private String desc;
    public static RefundTypeEnum enumOf(Byte refundType) {

        for (RefundTypeEnum refundTypeEnum : values()) {
            if (refundTypeEnum.refundType.equals(refundType)) {
                return refundTypeEnum;
            }
        }
        throw new RuntimeException("无法找到对应枚举");
    }
}
